import { reactive, toRefs } from "vue";
import { bannerImg } from "@/apis/home";
interface bannerType {
    exhibitionId: null;
    img: string;
    productId: null;
    type: number;
    _id: string;
}

export default function bannerHook() {
    let banner: any = reactive({
        list: []
    });

    const getBannerImg = async () => {
        let { status, data } = await bannerImg();
        if (status) banner = banner.list = data;
    };

    return {
        getBannerImg,
        banner
    };
}
